package com.yu1996.recruit.dao;

import com.sun.org.apache.regexp.internal.RE;
import com.yu1996.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 数据访问接口
 *
 * @author Administrator
 */
public interface RecruitDao extends JpaRepository<Recruit, String>, JpaSpecificationExecutor<Recruit> {
    /**
     * @param state 职位状态
     * @return java.util.List<Recruit>
     * @description 查询推荐职位（只查前六个）
     * @date 2019/10/11 19:02
     */
    List<Recruit> findTop6ByStateOrderByCreatetimeDesc(String state);

    /**
     * @param state 职位状态
     * @return java.util.List<Recruit>
     * @description 查询最新职位（只查前六个）
     * @date 2019/10/11 19:10
     */
    List<Recruit> findTop6ByStateNotOrderByCreatetimeDesc(String state);

}
